package se.jagvetintedu;

public class Problem6 {

	public int difference() {
		int sum1 = 0;
		int sum2 = 0;
		for (int t=1; t<= 100; t++) {
			sum1 += t;
			sum2 += t*t;
		}
		return sum1*sum1 - sum2;
	}
	
	public static void main(String args[])
	{
		System.out.println("Project Euler, problem 6");
		
		Problem6 solution = new Problem6();
		System.out.println("The difference between the sum of the squares of the first hundred natural number and the square of the sum: " + solution.difference());
	}
}
